package enum_d8;

//拓展：抽象枚举
public enum B {
    A("张三") {
        @Override
        public void go() {
            System.out.println(getName() + "在跑~");
        }
    },B("李四") {
        @Override
        public void go() {
            System.out.println(getName() + "在跑~");
        }
    },C("王五") {
        @Override
        public void go() {
            System.out.println(getName() + "在跑~");
        }
    };
    B() {
    }

    B(String name) {
        this.name = name;
    }

    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public abstract void go();
}
